/*
 * @Description: 
 * @Author: yeeChen
 * @Date: 2022-12-13 16:19:54
 * @LastEditTime: 2022-12-13 16:41:53
 * @LastEditors: yeeChen
 */
// 出现路径拼接错误，是因为提供了./或者../的相对路径
const fs = require('fs')
const path = require('path')

fs.readFile(path.join(__dirname,'/files/1.txt'), 'utf-8', function (err, dataStr) {
    if (err) {
        return console.log('读取失败'+err.message);
    }
    console.log('读取成功'+dataStr);
})